package com.woniuxy.staff.log;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author author
 * @create 2021-11-17 11:15  es使用的
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Document(indexName = "stafflog")
public class StaffLog {

    @Id   //
    @Field(name = "logid",type = FieldType.Keyword)
    private Integer logid;
    @Field(name = "username",type = FieldType.Text,searchAnalyzer = "ik_max_word",analyzer = "ik_smart")
    private String username;
    @Field(type = FieldType.Text)
    private String hostip;
    @Field(type = FieldType.Text)
    private String content;
    @Field
    private String operatortime;

}
